import { axios } from '../utils/request'

export function listTree(){
  return axios({
    url: `/product/category/list/tree`,
    method: 'GET'
  })
}

export function deleteType(ids){
  return axios({
    url: `/product/category/delete/${ids}`,
    method: 'GET'
  })
}

export function saveType(T){
  return axios({
    url: `/product/category/insert`,
    method: 'post',
    data: T
  })
}


export function updateType(T){
  return axios({
    url: `/product/category/update`,
    method: 'post',
    data: T
  })
}

export function deletes(T){
  return axios({
    url: `/product/category/deletes`,
    method: 'post',
    data: T
  })
}

export function listBrandPage(T){
  return axios({
    url: `/product/brand/list`,
    method: 'GET',
    params: T
  })
}

export function deleteBrand(ids){
  return axios({
    url: `/product/brand/delete/${ids}`,
    method: 'GET'
  })
}

export function saveBrand(T){
  return axios({
    url: `/product/brand/save`,
    method: 'post',
    data: T
  })
}

export function getDataList(T,id){
  return axios({
    url: `/product/attrgroup/list/${id}`,
    method: 'GET',
    params: T
  })
}

export function findAttrGroup(id){
  return axios({
    url: `/product/attrgroup/info/${id}`,
    method: 'GET',
  })
}

export function saveAttrGroup(T){
  return axios({
    url: `/product/attrgroup/save`,
    method: 'post',
    data: T
  })
}

export function findCategoryBrandList(id){
  return axios({
    url: `/product/categorybrandrelation/findCategoryBrandList/${id}`,
    method: 'get'
  })
}

export function CategoryBrandInsert(T){
  return axios({
    url: `/product/categorybrandrelation/insert`,
    method: 'post',
    data: T
  })
}







